<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/website/common/base.jsp"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>商品列表_${webname }</title>
<meta name="description" content="巨达药网judayw.com_广州巨孚达医药有限公司旗下的专业院外处方药采购平台，以处方药、新特药为核心品类，涵盖心脑血管、糖尿病、肝胆病等十多个专科用药，提供过万种药店畅销药。" />
<meta name="Keywords" content="药品采购,网上药品采购,处方药,新特药,心脑血管,糖尿病,药店畅销药,网上药店,网上买药,巨孚达,巨达药网,巨达" />

<%@ include file="/website/common/common.jsp"%>
<link href="${webctx }/css/list.css?v=20170705" rel="stylesheet" type="text/css" />
    <link href="${webctx }/css/sidebar.css?v=20170616" rel="stylesheet" type="text/css" />


<script src="${webctx }/js/Global.js"></script>
</head>
<style>
    #warp-foot{
        margin-top: 40px;
    }
</style>
<body>
<%@ include file="/website/common/top.jsp"%>
<%@ include file="/website/common/head.jsp"%>
<%@ include file="/website/common/menu.jsp"%>

<div id="warp-listGoods">
    <div style="width: 100%; height: 3px; background-color: #0daeff;"></div>
<div class="inner">
	 	<div class="nav-l-bd hide" id="clsnavmenu" style="top:0px;">
	    </div>
    </div>
	<div class="inner clearfix">
    	<div class="listGoods-left">
        	<div class="group">
            	<div class="group-head">
                	<div class="hd-inner clearfix">
                	<table style="width:100%">
                		<tr>
                		<td width="95" style="vertical-align: top"><span class="text">全部结果：</span></td>
                		<td>
                		<c:forEach items="${clsnavs }" var="cls">
	                        <a href="javascript:;" class="hd-nav">
	                            ${cls.name }<span onclick="removecls('${cls.code }')"></span>
	                            
	                        </a>
                            <input type="hidden" name="KFname" value="${cls.name }" />
                        </c:forEach>

                        <c:forEach items="${attrnavs }" var="attr">
	                        <a href="javascript:;" class="hd-nav">
	                            ${attr.attrname }<em> ${attr.text }</em><span onclick="removeattr('${attr.id }')"></span>
	                        </a>
                        </c:forEach>
                		</td>
                		<td align="right" width="160" style="vertical-align: top"><span class="text" id="resultCount"></span></td>
                		</tr>
                		</table>
                    </div>
                </div>
                <div class="group-bd">
                	<c:if test="${subclslist.size()>0 }">
                	<div class="row clstype">
                    	<div class="r-hd">分类：</div>
                    	<div class="r-bd">
                        	<div class="items clearfix">
                        		<c:forEach items="${subclslist }" var="cls">
                            	<a href="javascript:;" onclick="selCls(this)" code="${cls.code }">${cls.name }</a>
                                </c:forEach>                                                       
                            </div>
                        </div>
                        <c:if test="${subclslist.size()>0}">
                            <div class="r-ft">
                                <span class="show-more J_showBtn" >更多</span>
                                <span class="show-less J_showBtn" >收起</span>
                            </div>
                        </c:if>
                    	<div class="r-ft">

                        </div>
                    </div>
                	</c:if>
                	<c:forEach items="${attrlist }" var="attr">
                	<c:if test="${not empty attr.items}">
                    <div class="row expand attrs">
                    	<div class="r-hd">${attr.name }：</div>
                    	<div class="r-bd">
                        	<div class="items clearfix">
                        		<c:forEach items="${attr.items }" var="item">
                            	<a href="javascript:hish();" onclick="selattr(this)" itemid="${item.code }" <c:if test="${item.selected==1}">class="cur"</c:if>>${item.text }</a>
                            	</c:forEach>                             
                            </div>
                        </div>
                        <c:if test="${attr.items.size()>8}">
                    	<div class="r-ft">
                        	<span class="show-more J_showBtn" >更多</span>
                            <span class="show-less J_showBtn" >收起</span>
                        </div>
                        </c:if>
                    </div>
                    </c:if>
                    </c:forEach>
                </div>
            </div>
            <div class="sortbar">
            	<div class="sort-inner clearfix">
                    <ul class="sorts" id="J_sorts">
                        <li class="sort <c:if test="${ordertype==0 || empty ordertype }">cur</c:if>" ordertype="" orderby="0"><a href="javascript:;">综合</a></li>
                        <%--<li class="sort <c:if test="${ordertype==1}">cur</c:if>" ordertype="1" orderby="0"><a href="javascript:;">人气<span></span></a></li>--%>
                        <li class="sort <c:if test="${ordertype==2}">cur</c:if>" ordertype="2" orderby="0"><a href="javascript:;">销量</a></li>



                        <li class="sort <c:if test="${ordertype==3}">cur</c:if>" ordertype="3" orderby="<c:if test="${ordertype==3 }">${orderby }</c:if>">
                            <input type="hidden" value="${orderby }" name="orderbyvlalue">
                            <a href="javascript:;">价格
                                <c:if test="${ ordertype==3 && orderby == 0 }">
                                    <em style="float: right;width: 10px; height: 100%;"></em>
                                <span class="up-down-ico ico1" ></span>
                                </c:if>
                                <c:if test="${ ordertype==3 && orderby == 1}">
                                    <em style="float: right;width: 10px; height: 100%;"></em>
                               <span class="up-down-ico ico2" ></span>
                                </c:if>
                            </a>
                        </li>
                    </ul>
                    <div class="sort-search clearfix">
                    	<div class="show-select"><a href="javascript:;" class="<c:if test="${instock==1 }">cur</c:if> J_toClss">仅显示有货<span></span></a></div>
                        <div class="search-inner">
                        	<input name="floorid" type="hidden" value="${floorid }">
                        	<input name="flooritemid" type="hidden" value="${flooritemid }">
                        	<div class="sear-inp"><input type="text" name="querylike" value="${querylike }" placeholder="在结果中搜索"></div>
                        	<div class="sear-btn"><button onclick="query(1)">确定</button></div>
                        </div>
                    </div>
                    <ul class="cuts" id="J_cuts" >
                    	<li class="cuts-big"><a href="javascript:showlisttype('big')" >大图<span class="big-ico"></span></a></li>
                    	<li class="cuts-list"><a href="javascript:showlisttype('list')" >列表<span class="list-ico"></span></a></li>
                    </ul>
                    <ul class="sort-hd">
                        <li id="txtListPageInfo" class="pagebtn"><i class="cur"> 0 </i> / <i> 0 </i></li>
                        <li id="btnListPrev" class="sort-hd-btn btn-prev"></li>
                        <li id="btnListNext" class="sort-hd-btn btn-next"></li>
                    </ul>
                </div>
            	
            </div>
        	<div class="listGoods-main clearfix" id="productspanel">
               <!-- 商品列表 -->

                <div style='width: 100%;min-height: 300px;line-height: 300px;text-align: center;'><img src='${ctx}/website/images/blue_loading.gif'></div>

        	</div>
        	<div class="Pagination" style="width:100%">
        	<table align="center" style="margin:0 auto"><tr><td>
        		<div class="clearfix" id="pagelist"></div>
        		</td><td>
        		<div class="clearfix">
                	<span id="pageingcount">共0页，到第</span>
                    <span class="pag-inp"><input name="topagenum" type="text" value="" onkeyup="inputNumber(this)"></span>
                    <span>页</span>
                    <span class="pag-go"><button onclick="topageclick()">确定</button></span>
                </div>
                </td>
                </tr>
                </table>
        	</div>
        </div>
        
        <!--猜你喜欢-->	
		<div class="listGoods-right">
        	<div class="Related-main clearfix">
                <div class="Related-hd">
                    <h2><b style="margin-top:14px;"></b><span>猜你喜欢</span></h2>
                </div>
                <div class="Related-bd">
                    <ul id="maylike">
                        
                    </ul>
                </div>
            </div>
        </div>
    </div>

</div>
<%@ include file="/website/common/foot.jsp"%>
<%@ include file="/website/common/sidebar.jsp"%>

<script src="${webctx }/js/productlist.js"></script>
<script src="${ctx }/plugins/artTemplate/dist/template.js"></script>


<input name="showtype" value="${showtype }" type="hidden">
<input name="clscode" value="${clscode }" type="hidden">
<input name="pageno" value="${pageno }" type="hidden">



<script type="text/html" id="productHtml_big">
	{{each list as value i}}

    <li class="array-item pricture-wrap" pid="{{value.id}}">
        <div class="array-pic">
            <a href="{{ctx}}/product/info?priceid={{value.id}}" target="_blank">
                <img src="{{fileserver}}{{value.photo}}" width="200" height="200" onerror="this.src='{{ctx}}/website/images/noimg.jpg'" title="{{value.productname}}{{value.name}}&nbsp;{{value.b_guige}}">
            </a>
        </div>
        <div class="array-info">
            <div class="cost clear">
                    {{if isuserauth && islogin}}
                        {{ if value.canbuy=="1"}}
                        <strong>￥{{value.price}}</strong>
                        <div class="cost-span">
                            {{if value.promotion_coupon}}
                            <span>券</span>
                            {{/if}}
                            {{if value.promotion_money_off }}
                            <span>满减</span>
                            {{/if}}
                            {{if value.promotion_purchase_gift }}
                            <span>满赠</span>
                            {{/if}}
                            {{if value.promotion_buy_send }}
                            <span>买送</span>
                            {{/if}}
                            {{if value.promotion_flash_sale }}
                            <span>特价</span>
                            {{/if}}
                        </div>
                {{else }}
                <p style="color: #ff6767;">不在本区域销售</p>
                {{/if}}
                    {{else if !islogin}}
                        <font style="font-size:14px; color: #ff6767;">登录可见</font>
                    {{else}}
                        <font style="font-size:14px; color: #ff6767;">审核通过可见</font>
                    {{/if}}


            </div>
            <div class="title"><a href="{{ctx}}/product/info?priceid={{value.id}}" target="_blank"><em>{{value.productname}}{{value.name}}</em>&nbsp;{{value.b_guige}}</a></div>
            <div class="text clearfix">
	                    	<span class="fl">
							      {{value.b_chanjia}}
							</span>
            </div>
            <div class="btn clearfix">
                <div class="buy-Num-bd fl">
                    <input type="text" name="amount" onkeyup="inputAmount(this)" class="buy-numInp" maxnum="
                    {{if value.promotion_flash_sale }}
                    {{value.fs_amount||0}}
                    {{else}}
                    {{value.amount}}{{/if}}" value="1">
                    <span class="btn-reduce" onclick="lessenamount(this)">-</span>
                    <span class="btn-add" onclick="addamount(this)">+</span>
                </div>
                <span class="fl btn-txt"></span>
                <div class="buy-btn fl">
                    {{if value.promotion_flash_sale }}
                    <a sid="sid-cart-fly" onclick="addtocart(event,'{{value.id}}',this)" {{ if value.canbuy=="1"}}{{if value.fs_amount>0 }} class="can drug-pic"{{/if}}{{/if}}><i class="fa fa-cart-plus"></i>加入购物车</a>
                    {{else}}
                    <a sid="sid-cart-fly" onclick="addtocart(event,'{{value.id}}',this)" {{ if value.canbuy=="1"}}{{if value.amount>0 }}class="can drug-pic"{{/if}}{{/if}}><i class="fa fa-cart-plus"></i>加入购物车</a>
                    {{/if}}
                </div>
            </div>
        </div>
    </li>

	{{/each}}
</script>
<script type="text/html" id="productHtml_list">
	{{each list as value i}}
    <li class="row-item pricture-wrap" pid="{{value.id}}">
        <div class="pic"><a href="{{ctx}}/product/info?priceid={{value.id}}" target="_blank"><img src="{{fileserver}}{{value.photo}}" width="138" height="138" onerror="this.src='{{ctx}}/website/images/noimg.jpg'"  title="{{value.productname}}{{value.name}}&nbsp;{{value.b_guige}}"/></a></div>
        <div class="text title">
            <h3><a href="{{ctx}}/product/info?priceid={{value.id}}" target="_blank">{{value.productname}}{{value.name}}</a></h3>
            <p>厂家：{{value.b_chanjia}}</p>
            <p>规格：{{value.b_guige}}</p>
        </div>
        <div class="text details">
            <p> <em style="letter-spacing: 6px">通用</em>名：感冒灵</p>
            <p>批准文号：{{value.b_pzwh}}</p>
        </div>
        <div class="text cost">
            <p>{{if isuserauth && islogin && value.canbuy=="1"}}<strong>￥{{value.price}}</strong>{{else if !islogin}}<font class="red">登录可见</font>{{else if !isuserauth}}<font class="red">审核通过可见</font>{{else }}<font class="red">不在本区域销售</font>{{/if}}</p>
            {{if value.canbuy == "1"}}
            <p>
                {{if value.promotion_coupon}}
                <span>券</span>
                {{/if}}
                {{if value.promotion_money_off }}
                <span>满减</span>
                {{/if}}
                {{if value.promotion_purchase_gift }}
                <span>满赠</span>
                {{/if}}
                {{if value.promotion_buy_send }}
                <span>买送</span>
                {{/if}}
                {{if value.promotion_flash_sale }}
                <span>特价</span>
                {{/if}}
            </p>
            {{/if}}
        </div>
        <div class="row-btn">
            <div class="fl">
                <div class="buy-Num-bd fl">
                    <input type="text" name="amount" onkeyup="inputAmount(this)" class="buy-numInp" maxnum="
                    {{if value.promotion_flash_sale }}
                    {{value.fs_amount||0}}
                    {{else}}
                    {{value.amount}}{{/if}}" style="height:16px;line-height:16px;" value="1" />
                    <span class="btn-reduce" onclick="lessenamount(this)">-</span>
                    <span class="btn-add" onclick="addamount(this)">+</span>
                </div>
            </div>

            <div class="buy-btn2 buy-add-cart fl">
                {{if value.promotion_flash_sale }}
                <%--<a sid="sid-cart-fly" onclick="addtocart(event,'{{value.id}}',this)" {{ if value.canbuy =="1"}}{{if value.fs_amount }} class="can drug-pic"{{/if}}{{/if}}><i class="fa fa-cart-plus"></i>加入购物车</a>--%>
                <a sid="sid-cart-fly" href="javascript:;" onclick="addtocart(event,'{{value.id}}',this)" {{ if value.canbuy =="1"}}{{if value.fs_amount>0 }}class="can drug-pic"{{/if}}{{/if}}><i class="fa fa-cart-plus"></i>加入购物车</a>
                {{else}}
                <a sid="sid-cart-fly" href="javascript:;" onclick="addtocart(event,'{{value.id}}',this)" {{ if value.canbuy =="1"}}{{if value.amount>0 }}class="can drug-pic"{{/if}}{{/if}}><i class="fa fa-cart-plus"></i>加入购物车</a>
                {{/if}}
            </div>

            <div class="clearfix"></div>
            <p class="repertory">库存：
                {{if value.promotion_flash_sale }}
                {{if value.fs_amount>100}}>100
                {{else if !value.fs_amount}}
                无
                {{else}}
                {{value.fs_amount}}
                {{/if}}
                {{else}}
                {{if value.amount>100}}>100
                {{else if value.amount<0}}
                无
                {{else}}
                {{value.amount}}
                {{/if}}
                {{/if}}
            </p>

        </div>
    </li>

	{{/each}}
</script>

<script>

</script>

</body>
</html>

